package com.smart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.smart.model.domain.ManageUserRegistrationDO;
import com.smart.model.request.ManageUserRegistrationRequest;
import com.smart.model.request.ProjectRequest;
import com.smart.model.vo.ManageUserRegistrationVO;
import com.smart.model.vo.ProjectVO;
import com.smart.model.vo.SuperviseManageCountVO;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author zhanghong
 */
public interface ManageUserRegistrationService extends IService<ManageUserRegistrationDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
     ManageUserRegistrationVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<List<ManageUserRegistrationVO>> cloudPageQueryManage(ManageUserRegistrationRequest request, Pageable pageable);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<ManageUserRegistrationVO> listQuery(ManageUserRegistrationRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Object entrance(ManageUserRegistrationRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Object exit(ManageUserRegistrationRequest request);
    /**
     * 根据主键删除
     * @param id
     * @return
     */
    Boolean deleteByKey(long id);

    ManageUserRegistrationVO exitVerify(String idCard, Long projectId);

    PageInfo<List<ManageUserRegistrationVO>> supervisePageQueryRecords(ManageUserRegistrationRequest request, Pageable pageable);

    PageInfo supervisePageQueryManage(ProjectRequest request);

    Object entranceVerify(String idCard, Long projectId);

    PageInfo<List<ManageUserRegistrationVO>> supervisePageLists(ManageUserRegistrationRequest request, Pageable pageable);

    SuperviseManageCountVO supervisePageQueryManageCount(ProjectRequest request);

    /**
     * 统计在监项目在场人数
     * @return
     */
    Integer countOnlineProjectPersonCount();
}
